import 'package:flutter/material.dart';
import 'PaddingDemo.dart';
import 'ConstrainedBoxDemo.dart';
import 'DecoratedDemo.dart';
import 'ContainerDemo.dart';


void main() => runApp(MyApp());

class MyApp extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(

      home: HomePage(),
    );
  }
}


class HomePage extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return Scaffold(

        appBar: AppBar(title: Text('容器类Demo'),),

        body: ListView(

          children: <Widget>[

            RaisedButton(

              onPressed: () {
                Navigator.push(context, MaterialPageRoute(builder: (c) {
                  return PaddingDemo();
                }));
              },
              child: Text('Padding'),
            ),

            RaisedButton(

              onPressed: () {
                Navigator.push(context, MaterialPageRoute(builder: (c) {
                  return ConstrainedBoxDemo();
                }));
              },
              child: Text('尺寸限制类容器'),
            ),



            RaisedButton(

              onPressed: () {
                Navigator.push(context, MaterialPageRoute(builder: (c) {
                  return DecoratedBoxDemo();
                }));
              },
              child: Text('装饰类类容器'),
            ),


            RaisedButton(

              onPressed: () {
                Navigator.push(context, MaterialPageRoute(builder: (c) {
                  return ContainerDemo();
                }));
              },
              child: Text('Container容器'),
            ),
          ],
        )
    );
  }
}